<template>
  <div class="bg back" id="scrollBox">
    <!-- 导航 -->
    <div>
      <Nav />
    </div>
    <!-- 首页 -->
    <div class="d_jump" id="anchor0"><Index /></div>
    <!-- 第二页关于我 -->
    <div class="about_tag d_jump" id="anchor1">
      <About />
    </div>
    <!-- 第三页经历 -->
    <div class="d_jump" id="anchor2">
      <Experience></Experience>
    </div>
    <!-- 第四页 -->
    <div class="about_tag d_jump" id="anchor3">
      <Blog />
    </div>
  </div>
</template>

<script>
import Index from "@/components/Index.vue";
import Experience from "@/components/Experience.vue";
import Nav from "@/components/Nav.vue";
import About from "@/components/About.vue";
import Blog from "@/components/Blog.vue";
export default {
  name: "Home",
  components: {
    Index,
    Experience,
    Nav,
    About,
    Blog,
  },
  data() {
    return {
      // currentComp: Experience,
      count:0
    };
  },
  methods: {
    preImg() {
      let img = new Image();
      img.src = require("../assets/bg1.jpeg");
      img.onload=()=>{
        this.count++
      }
    },
  },
  mounted() {
    this.preImg();
  },
};
</script> 

<style lang='scss' scoped>
@import "../styles/variable";

.bg {
  background: #fff;
}
.about_tag {
}
</style>